package com.tianjia.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.tianjia.entity.Sheji;
import com.tianjian.dao.impl.SheJiDaoImpl;


public class AboutServlet extends HttpServlet {
    
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		SheJiDaoImpl sjdi = new SheJiDaoImpl();//创建对象
		List<Sheji> sheji = sjdi.getShejiList();//通过打点方式,调用方法获得方法对象
		request.setAttribute("sheji", sheji);//存数据
		
		request.getRequestDispatcher("about.jsp").forward(request, response);//转发
    	
    }

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
